-- GENERATED SPELL FOR [Hoodoo Master Fu'jin] --


function spell0_31101(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_31101', 3000, 1)
end

function spell1_31101(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31101', 3000, 1)
end

function spell2_31101(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31101', 11500, 1)
end

function Sorts_31101(pUnit, Event)
local choix_sorts_31101 = math.random(0, 2)
if choix_sorts_31101 == 0 then
pUnit:RegisterEvent('spell0_31101', 1, 1)
end
if choix_sorts_31101 == 1 then
pUnit:RegisterEvent('spell1_31101', 1, 1)
end
if choix_sorts_31101 == 2 then
pUnit:RegisterEvent('spell2_31101', 1, 1)
end
end

function mob31101_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31101', math.random(1500, 3000), 1)
end

function mob31101_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31101_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31101_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31101, 1, 'mob31101_Action')
RegisterUnitEvent(31101, 2, 'mob31101_Leave')
RegisterUnitEvent(31101, 3, 'mob31101_Kill')
RegisterUnitEvent(31101, 4, 'mob31101_Die')
